package com.bdqn.redsi.service;

import com.bdqn.redsi.pojo.User;
import com.bdqn.redsi.repository.UserRepository;
import jakarta.annotation.Resource;
import org.springframework.cache.annotation.Cacheable;

public class UserService {

    @Resource
    private UserRepository userRepository;
   // @Cacheable(value = "user",KeyGenerator = "keyGenerator")
    public User getUser(Long userId){
     return userRepository.findById(userId).get();
    }
}
